def JieCheng(x):
    if x<=0:
        return 1
    y=x*JieCheng(x-1)

    # def JieCheng(x):
    #     if x <= 0:
    #         return 1
    #     y = x * JieCheng(x - 1)
    return y


x=int(input())
y=JieCheng(x)
print(y)